package com.black.utils.network.transmit.udp;

import com.black.utils.commons.network.Sender;
import com.black.utils.commons.pool.PoolProperties;

/**
 * @author ylx
 */
public class UDPSender extends Sender<UDPClient> {
    public UDPSender() {
        this("/udp.properties");
    }

    public UDPSender(String sourcePath) {
        super(new PoolProperties(sourcePath), UDPClientFactory.class);
    }

    @Override
    public boolean send(String message) {
        UDPClient udpClient = pool.borrowObject();
        return udpClient.send(message);
    }
}
